// 去重
export function unique (arr) {
    return Array.from(new Set(arr));
  }
// 防抖
export function debounce(fn, delay) {
    let timer = null;
    return function (...args) {
        timer && clearTimeout(timer);
        timer = setTimeout(() => {
            fn.apply(this, args);
        }, delay)
    };
}
